<?php
/**
 * Created by PhpStorm.
 * User: Jiarui
 * Date: 2015/11/12
 * Time: 16:46
 */

namespace Admin\Model;
use Think\Model;

class AdminModel extends Model
{
    public function changePassword($id,$password){

        $where['id'] = $id;

        $data = array(
            'password' => md5($password)
        );

        $result = $this->where($where)->data($data)->save();

        return $result;

    }
}